package com.system.data.dao;

import com.system.data.model.AgriNyywArtical;
import com.system.data.model.AgriNyyw_info;
import com.system.data.model.NjwProductsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AgriNyywDao {

    @Select("select title,date,source,url from agri_nyyw limit 25;")
    List<AgriNyyw_info> findAllAgriNyywInfo();

    @Select("select text from agri_nyyw where title=#{title};")
    List<AgriNyywArtical> findArticalBytitle(@Param("title") String title);

    @Select("select title,date,source,url from agri_nyyw where province=#{province} limit 25;")
    List<AgriNyyw_info> findAgriNyywInfoByProvince(@Param("province") String province);
}
